//
//  DetailColorCollectionViewCell.m
//  W2MD
//
//  Created by zhudongwei on 14/11/14.
//  Copyright (c) 2014年 zhudongwei. All rights reserved.
//

#import "DetailColorCollectionViewCell.h"

@implementation DetailColorCollectionViewCell
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self != nil)
    {
        UIView *wbg = [[UIView alloc] initWithFrame:CGRectMake(4, 4, 37, 37)];
        wbg.backgroundColor = [UIColor whiteColor];
        [[self contentView] addSubview:wbg];
        _colorView = [[UIView alloc] initWithFrame:CGRectMake(5, 5, 35, 35)];
        [[self contentView] addSubview:self.colorView];
        
        _checkIV = [[UIImageView alloc] initWithFrame:CGRectMake(self.bounds.size.width-17, 0, 17, 17)];
        self.checkIV.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
        self.checkIV.contentMode = UIViewContentModeScaleAspectFill;
        self.checkIV.clipsToBounds = YES;
        self.checkIV.layer.borderColor = [UIColor blackColor].CGColor;
        self.checkIV.layer.edgeAntialiasingMask =
        kCALayerLeftEdge | kCALayerRightEdge | kCALayerBottomEdge | kCALayerTopEdge;
        [self.checkIV setImage:[UIImage imageNamed:@"home_check.png"]];
        [[self contentView] addSubview:self.checkIV];
    }
    return self;
}
@end
